package cn.gov.pbc.tims.util;

import org.springframework.stereotype.Component;
import com.fasterxml.jackson.annotation.JsonInclude;
@Component("result")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Result {
	/*
	 * code 0成功;1失败;3未登录;其它自定义
	 * 
	 */
	public Integer code=0;
	public String msg;
	public Object data;
	public void clear(){
		code=0;msg="";data=null;
	}
	public void setValue(Integer code,String msg,Object data){
		this.code = code;
		this.msg = msg;
		this.data = data;
	}
	public void setValue(Integer code,String msg){
		this.code = code;
		this.msg = msg;
		this.data = null;
	}
	public void setValue(Integer code,Object data){
		this.code = code;
		this.data = data;
	}
	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
	
}
